/* Copyright (c) 2004-2024 Peigen.info. All rights reserved. */

package info.peigen.hotpot.business.customer.core.domain.auth;

import info.peigen.hotpot.business.customer.facade.enums.auth.CustomerCertRole;
import info.peigen.hotpot.common.core.domain.DomainObject;
import info.peigen.hotpot.common.core.enums.CertType;
import lombok.*;
import lombok.experimental.Accessors;
import lombok.experimental.FieldDefaults;
import lombok.experimental.SuperBuilder;

import java.util.Date;

import static info.peigen.hotpot.business.customer.facade.enums.auth.CustomerCertRole.Legal_Representative;
import static info.peigen.hotpot.common.core.enums.CertType.Identity_Card;

/**
 * <b>(CustomerAuthenticationIdentity)</b>
 * 认证记录
 *
 * @author Peigen
 * @version 1.0.0
 * @since 2021/9/12
 */
@EqualsAndHashCode(callSuper = true)
@SuperBuilder
@Data
@NoArgsConstructor
@AllArgsConstructor
@FieldDefaults(level = AccessLevel.PRIVATE)
@Accessors(chain = true)
public class CustomerAuthenticationIdentity extends DomainObject {
    /** 客户ID */
    String customerId;
    /** 姓名 */
    String name;
    /** 身份证号 */
    String number;
    /** 认证角色 */
    @Builder.Default
    CustomerCertRole customerCertRole = Legal_Representative;
    /** 证件类型 */
    @Builder.Default
    CertType         customerCertType = Identity_Card;
    /** 身份证照片-正面 */
    String frontImage;
    /** 身份证照片-反面 */
    String backImage;
    /** 手持身份证照片 */
    String holdingIdImage;
    /** 有效期 */
    String periodOfValidity;
    /** 有效期始 */
    Date   periodOfValidityStart;
    /** 有效期止 */
    Date   periodOfValidityEnd;
    /** 是否长期有效，Y:是,N:否 */
    String periodOfValidityLongTerm;
}